package Demo10;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Configuration 被改注解标注的类表示是spring配置类
 */

@Configuration
@ComponentScan("Demo10")
public class Demo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(Demo.class);
        Person person=context.getBean(Person.class);
        System.out.println(person);

    }
}
